<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>计算属性</title>
</head>
<body>
<div id="app">

    {{fullName}}
    页面渲染了{{count}}次

    <div>
        firstName:<input v-model="firstName"/>
    </div>
    <div>
        lastName:<input v-model="lastName"/>
    </div>
    <input v-model="message"/>
    {{message}}
</div>
</body>
<script src="../../lib/vue.js"></script>
<script>

    new Vue({
        el:'#app',
        data:{
            firstName:'Mat',
            lastName:'Green',
            message:'hello',
            count:0
        },
        computed:{
            fullName(){
                this.count+=1;
                return this.firstName + this.lastName;
            }
        }
    })

</script>
</html>